Correctly attempt multiple usernames with libgit2
authorAlex Crichton <alex@alexcrichton.com>
Sat, 16 Apr 2016 00:45:30 +0000 (17:45 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 18 Apr 2016 04:52:48 +0000 (21:52 -0700)
commit537f7185422e8839986ae2ec29a341009b48e418
tree39b51c1f80c91f32b393df7df4bb0eeb47cd4bcd
parent88e30811d3f85a881452d22a852714c7e440ddad
Correctly attempt multiple usernames with libgit2

This commit corrects the logic for attempting multiple usernames with libgit2.
There is a restriction that for each authentication seession you can only
authenticate with one ssh username, but we were attempting multiple as part of
the same sesssion. Instead restart authentication whenever we try a new username.

Closes #2399
src/cargo/sources/git/utils.rs
tests/test_cargo_build_auth.rs